package com.hnkywl.sts.entity.cwgl;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.organ.Gsjg;
import com.hnkywl.sts.entity.organ.Khh;
import com.hnkywl.sts.entity.organ.Nbgs;
import com.hnkywl.sts.entity.sys.Yg;
import com.hnkywl.sts.entity.zjgl.*;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * 说明：开户行明细表
 * 包:        com.hnkywl.sts.entity.organ
 * 类描述:    开户行
 * 修改备注: [说明本次修改内容]
 * 版本:        [v1.0]
 */
@Entity
@Table(name = "T_SYS_KHZFSFMX")
@Where(clause = "deleted!='1'")
public class Khzhsfmx extends BaseEntity {
    @Id
    @SequenceGenerator(name = "seqKhzhsfmx", allocationSize = 1, sequenceName = "SEQ_SYS_KHZHSFMX")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqKhzhsfmx")
    private Long id;

    /**
     * 公司
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="NBGS_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Gsjg nbgs;


    /**
     * 类别  1收（增加） 2 付（减少）
     */
    private Integer type;

    /**
     * 入账银行
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name="RZYH_ID")
    @NotFound(action = NotFoundAction.IGNORE)
    private Khh rzyh;

    /**
     * 账户类别   1 存款户  2 保证金
     */
    private Integer zh;

    /**
     * 支付方式
      */
    @ManyToOne
    @JoinColumn(name="ZFFS_SJZDZ_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Sjzdz zffs;

    /**
     * 票据
     */
    @ManyToOne
    @JoinColumn(name="PJ_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Pj pj;



    /**
     * 信用证
     */
    @ManyToOne
    @JoinColumn(name="XYZ_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Xyz xyz;

    /**
     * 银行授信
     */
    @ManyToOne
    @JoinColumn(name="YHSX_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Yhsx yhsx;


    /**
     * 银行授信
     */
    @ManyToOne
    @JoinColumn(name="YHSXMX_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Yhsxmx yhsxmx;


    /**
     * 金额
     */
    private Double je;

    /**
     * 备注
     */
    private String bz;

    /**
     * 审核人
     */
    @ManyToOne
    @JoinColumn(name="SHR_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Yg shr;

    /**
     * 制单人
     */
    @ManyToOne
    @JoinColumn(name="ZDR_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Yg zdr;

    /**
     * 关联类型   银行借款jkID: 1=银行借款,2=还款,3=付息,14=个人借款15=个人还款
     *应付票据pjID: 4=开具,5=承兑,
     *应收票据pjID: 6=托收(到期),7=贴现(未到期),8=贴现利息
     */
    private Integer gllx;

    /**
     * 贴现承兑导入
     */
    @ManyToOne
    @JoinColumn(name="PJDR_ID")
    @NotFound(action= NotFoundAction.IGNORE)
    private Pjdr pjdr;



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Gsjg getNbgs() {
        return nbgs;
    }

    public void setNbgs(Gsjg nbgs) {
        this.nbgs = nbgs;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Khh getRzyh() {
        return rzyh;
    }

    public void setRzyh(Khh rzyh) {
        this.rzyh = rzyh;
    }

    public Integer getZh() {
        return zh;
    }

    public void setZh(Integer zh) {
        this.zh = zh;
    }

    public Sjzdz getZffs() {
        return zffs;
    }

    public void setZffs(Sjzdz zffs) {
        this.zffs = zffs;
    }

    public Pj getPj() {
        return pj;
    }

    public void setPj(Pj pj) {
        this.pj = pj;
    }

    public Double getJe() {
        return je;
    }

    public void setJe(Double je) {
        this.je = je;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public Yg getShr() {
        return shr;
    }

    public void setShr(Yg shr) {
        this.shr = shr;
    }

    public Yg getZdr() {
        return zdr;
    }

    public void setZdr(Yg zdr) {
        this.zdr = zdr;
    }

    public Integer getGllx() {
        return gllx;
    }

    public void setGllx(Integer gllx) {
        this.gllx = gllx;
    }

    public Yhsx getYhsx() {
        return yhsx;
    }

    public void setYhsx(Yhsx yhsx) {
        this.yhsx = yhsx;
    }

    public Xyz getXyz() {
        return xyz;
    }

    public void setXyz(Xyz xyz) {
        this.xyz = xyz;
    }

    public Yhsxmx getYhsxmx() {
        return yhsxmx;
    }

    public void setYhsxmx(Yhsxmx yhsxmx) {
        this.yhsxmx = yhsxmx;
    }

    public Pjdr getPjdr() {
        return pjdr;
    }

    public void setPjdr(Pjdr pjdr) {
        this.pjdr = pjdr;
    }
}
